import './App.css';
const a = "刘凯欣";
// 条件渲染
const isloading = true;
const loadData = () => {
  if (isloading) {
    return <div>Loading...</div>
  }
  else {
    return <div>数据加载完成</div>
  }
}
// 列表渲染
const songs = [
  { id: 1, name: "痴心妄想" },
  { id: 2, name: "白日做梦" },
]
const list = (
  <ul>
    {songs.map(item => {
     return <li key={item.id}>{item.name}</li>
    })}
  </ul>
)

const h1 = (
  <div>
  <h1 className="title">这个h1</h1>
  <h1 style={{color:'red',backgroundColor:'yellow'}}>这个h2</h1>
  </div>
)

function App() {
  return (
    <div className="app_wrap">
      {a}{3 < 6 ? '小于' : '大于'}
      {loadData()}
      {list}
      {h1}
    </div>
  );
}



export default App;
